-
Notifications
You must be signed in to change notification settings - Fork 3.3k
fix(spotless): Exclude generated code from spotless #15104
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
fix(spotless): Exclude generated code from spotless #15104
Conversation
Bundle ReportBundle size has no change ✅ |
anshbansal
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
team is working on fixing cypress. But this looks good.
51640a7 to
d1795e8
Compare
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
|
@redblackcoder , some metadata-io test cases are failing |
Deepak, I’ll take a look at it tomorrow morning. Seems like there is another run of the test happening right now. |
Summary
Spotless is configured to work on generated code in the repo. This seems unnecesary and makes the spotlessCheck and spotlessApply take long to run.
This PR successfully eliminates unnecessary code generation from the
spotlessChecktask, resulting in a 93.5% reduction in execution time (from 1m 33s to 6s).Performance Metrics
Key Changes Eliminated
Code Generation Tasks No Longer Triggered
The following expensive code generation tasks no longer run during
spotlessCheck::metadata-models:generateDataTemplate- Processing 610 schema files:metadata-models:generateAvroSchema- Processing 610 schema files:metadata-models:generateJsonSchema- JSON schema generation:metadata-models:openApiGenerate- OpenAPI code generation:metadata-models:compileMainGeneratedDataTemplateJava- Compiling generated code:datahub-graphql-core:graphqlCodegen- Generating 1079 GraphQL classes:metadata-service:openapi-analytics-servlet:openApiGenerate:metadata-service:openapi-entity-servlet:openApiGenerateChanges Made
spotlessJava.dependsOnon generation tasks in:Result
✅
spotlessChecknow runs only on actual source files and does not trigger any code generation pipelines, making the development workflow significantly faster for code quality checks.